﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class ShopBonusInfoConfig : EntityTypeConfiguration<ShopBonusInfo>
    {
        public ShopBonusInfoConfig()
        {
            ToTable("Himall_ShopBonus");
            Property(item => item.CardColor).HasColumnType("varchar").HasMaxLength(50);
            Property(item => item.CardSubtitle).HasColumnType("varchar").HasMaxLength(50);
            Property(item => item.CardTitle).HasColumnType("varchar").HasMaxLength(50);
            Property(item => item.ShareDetail).HasColumnType("varchar").HasMaxLength(500);
            Property(item => item.ShareImg).HasColumnType("varchar").HasMaxLength(500);
            Property(item => item.ShareTitle).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.QRPath).HasColumnType("varchar").HasMaxLength(500);
            Property(item => item.Name).HasColumnType("varchar").HasMaxLength(50);
            HasRequired(x => x.Himall_Shops).WithMany(x => x.Himall_ShopBonus).HasForeignKey(x => x.ShopId);
        }
    }
}
